import React from 'react';
import {
    Text,
    Image,
    TouchableOpacity,
} from 'react-native';
import { pxPage } from '../common/Common'

const Btn = (obj, img, onPress) => {
    return <TouchableOpacity style={{
        marginLeft: pxPage(30),
        marginRight: pxPage(30),
        height: pxPage(42),
        width: pxPage(120),
        backgroundColor: '#FEA6C4',
        flexDirection: 'row',
        borderRadius: 15,
        justifyContent: 'center',
        alignItems: 'center',
        elevation: 1.5,
        shadowColor: '#fff',
        shadowOffset: { width: 0, height: 0 },
        shadowOpacity: 1,
        shadowRadius: 1.5,
    }}
        onPress={obj.onPress}>
        <Image style={{
            width: pxPage(25),
            height: pxPage(25),
            marginRight: pxPage(7),
        }} source={obj.img}></Image>
        <Text style={{ color: '#fff' }}>{obj.title}</Text>
    </TouchableOpacity>
}

export default Btn